package example.my_practice;

import example.entity.FanShe;
import example.entity.FanShe02;
import lombok.extern.slf4j.Slf4j;

import java.lang.reflect.Field;

/**
 * @author Administrator
 */
@Slf4j
public class FanSheTest {

    public static void main1(String[] args) throws IllegalAccessException {
        FanShe fanShe = new FanShe();
        Field[] declaredFields = fanShe.getClass().getDeclaredFields();
        for (Field field : declaredFields) {
            System.out.println(field.getType() == FanShe02.class);
            field.setAccessible(true);
            field.set(fanShe, new FanShe02());
        }
        System.out.println(declaredFields.length);
    }


    public static void main(String[] args) {
        String a = "件/大小/中号";
        String[] split = a.split("/");
        String[] split2 = a.split("/");
        System.out.println(split);
    }

}
